Documentation > CMS Template API Library > Util > Log(String,Object[])

Log

Logs a Custom log in the global context with no applicable asset with the given message string The log will be added to the System History (Reports > Audit > System) with the action type "Custom"and will only be displayed when "Custom" is selected from the drop-down.

public System.Void Log(String,Object[])

Parameters

NameDescriptionType
message The message to log System.String
args Optional : The variables to be inserted into a message System.Object[]

Code Example

C#

Sample:

                 Util.Log("this is my message");
                 Util.Log("The {0} is {1}", "date", DateTime.Now.Date);
            

Connect with Crownpeak